'use strict';

define([
    './baseBean',
], function(
    BaseBean
) {
    function me() {
        BaseBean.apply(this, arguments);
        var self = this;
        this.buildCreative = function(params, callback, errorCallback) {
            self.p('/ecTemplateMateriel/buildCreative', params, function(result) {
                if (callback) {
                    callback(result, params);
                }
            }, errorCallback);
        }

        this.buildCreativeResult = function(params, callback, errorCallback) {
            self.p('/ecTemplateMateriel/buildCreativeResult', params, function(result) {
                if (callback) {
                    callback(result, params);
                }
            }, errorCallback);
        }

        this.allElement = function(params, callback, errorCallback) {
            self.p('/elementCategory/allCreate', params, function(result) {
                if (callback) {
                    callback(result, params);
                }
            }, errorCallback);
        }

        this.initAdvanced = function(params, callback, errorCallback) {
            self.p('/ecTemplateMateriel/advancedData', params, function(result) {
                if (callback) {
                    callback(result, params);
                }
            }, errorCallback);
        }

        this.save = function(params, callback, errorCallback) {
            self.p('/ecTemplateMateriel/save', params, function(result) {
                if (callback) {
                    callback(result, params);
                }
            }, errorCallback);
        }

        this.checkName = function(params, callback, errorCallback) {
            self.p('/ecTemplateMateriel/checkName', params, function(result) {
                if (callback) {
                    callback(result, params);
                }
            }, errorCallback);
        }


    };
    return new me();
});
